﻿/*
 * Voicer.cs
 * 
 * 语音模块
 * 
 * By developer_ken
 */
using System;
using System.Collections.Generic;
using System.Device.Gpio;
using System.Text;
using System.Threading;

namespace SmGateDemo
{
    public class Voicer : ISensor
    {
        GpioController GPIO;
        const int PIN_VOICER = 32;
        public Voicer()
        {

        }
        public void Init()
        {
//#if RELEASE
            GPIO = new GpioController(PinNumberingScheme.Board);
            GPIO.OpenPin(PIN_VOICER, PinMode.Output);
//#endif
        }

        public void PlayVoice()
        {
            GPIO.Write(PIN_VOICER, PinValue.High);
            Thread.Sleep(100);
            GPIO.Write(PIN_VOICER, PinValue.Low);
        }
    }
}
